#include <stdio.h>

long v[16];

static void sub()
{
	unsigned long a, b;
	a = __builtin_ia32_rdtsc();
	v[0] = 0;
	__builtin_ia32_mfence();
	b = __builtin_ia32_rdtsc();
	printf("%lu\n", b - a);
}

int main()
{
	sub();
	__builtin_ia32_clflush(v);
	__builtin_ia32_mfence();
	sub();
	sub();
	return 0;
}
